
package com.hlkj.pay.app.merchant.ext.impl.helipay.dto.res;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import com.hlkj.framework.common.util.json.JsonUtils;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author HlpayTeam
 * @date 2024/12/26 14:37
 */
@Data
@NoArgsConstructor
public class HeliPayMerchantSettlementQueryRes extends HeliPayOrderCommonRes {

    private String rt1_bizType;

    private String rt2_retCode;

    private String rt3_retMsg;
    // @JsonDeserialize(using = EmptyArrayToNullListDeserializer.class)
    private String rt4_settleRecords;
    @Data
    public static class SettleRecord {

        // 商户编号
        private String customerNumber;

        // 订单号
        private String orderId;

        // 结算日期
        private String settleDate;

        // 结算金额
        private String settlementAmount;

        // 结算手续费
        private String settleFee;

        // D0资金
        private String d0Amount;

        // D0手续费
        private String d0Fee;

        // Dr资金
        private String todayAmount;

        // Dr手续费
        private String todayFee;

        // D0-Dr资金
        private String nonTodayD0Amount;

        // D0-Dr手续费
        private String nonTodayD0Fee;

        // 结算类型
        private String settleType;

        // 结算状态
        private String orderStatus;

        // 失败原因
        private String reason;

        // 完成时间
        private String completeDate;
    }
    public static void main(String[] args) {
        String response="{\"rt2_retCode\":\"0000\",\"rt4_settleRecords\":\"[]\",\"sign\":\"MEUCIQCYT180KqasE2V1n3BvZTOH6PsVIuVRV/yWplm40UtsgwIgFYIgC3GULaUbh3F40DEfM2Y0sbp1S1dohLYayaD5xdE=\",\"rt1_bizType\":\"MerchantSettlementQuery\",\"rt3_retMsg\":\"接收成功\"}";
        System.out.println(JsonUtils.parseObject(response, HeliPayMerchantSettlementQueryRes.class));

        HeliPayMerchantSettlementQueryRes heliPayMerchantSettlementQueryRes=new HeliPayMerchantSettlementQueryRes();
        heliPayMerchantSettlementQueryRes.setSign("s");
        // heliPayMerchantSettlementQueryRes.setRt4_settleRecords();
        response=JsonUtils.toJsonString(heliPayMerchantSettlementQueryRes);
        System.out.println(JsonUtils.parseObject(response, HeliPayMerchantSettlementQueryRes.class));

    }
}
